Flow of the Protocol:

Device POSTs Header: [request_code] => receive_cmd
Device POSTs Body: (Device Information)
Server Response Header: [response_code] => OK

Device POSTs Header: [request_code] => realtime_glog
Device POSTs Body: (Attendance Information)
Server Response Header: [response_code] => OK


Example HTTP POST Data (Headers and Body) in sequence from Device to Server and Response:

STEP1
-----

Device PING Post Headers:
{
  "Accept": "*/*",
  "Accept-Language": "en-us",
  "Accept-Encoding": "gzip, deflate",
  "User-Agent": "Mozilla/4.0",
  "Content-Type": "application/octet-stream",
  "Connection": "close",
  "request_code": "receive_cmd",
  "dev_id": "9999999",
  "blk_no": 0,
  "blk_len": 253,
  "Host": "time.appstime.in"
}

Device PING Post Body :
ù{"fk_name":"DT20F","fk_time":"20250627122233","fk_info":{"supported_enroll_data":["FACE","FP","PASSWORD","IDCARD"],"fk_bin_data_lib":"FKDATAHS101","firmware":"WS631B_FC2FP3_V4.08","firmware_filename":"WS630B","fp_data_ver":128,"face_data_ver":100}}

Server PING Response Headers:
{
  "Date": "Fri, 27 Jun 2025 06:52:36 GMT",
  "Server": "Apache",
  "X-Powered-By": "PHP/8.1.32",
  "Cache-Control": "private",
  "Connection": "close, Upgrade",
  "Expires": "0",
  "response_code": "OK",
  "Upgrade": "h2,h2c",
  "Vary": "Accept-Encoding",
  "Content-Length": "0",
  "Content-Type": "application/octet-stream"
}

Server PING Response Body: NULL


STEP2
-----

Device Attendance Post Headers:
{
  "Accept": "*/*",
  "Accept-Language": "en-us",
  "Accept-Encoding": "gzip, deflate",
  "User-Agent": "Mozilla/4.0",
  "Content-Type": "application/octet-stream",
  "Connection": "close",
  "request_code": "realtime_glog",
  "dev_id": "9999999",
  "trans_id": 0,
  "blk_no": 0,
  "blk_len": 115,
  "Host": "time.appstime.in"
}

Device Attendance Post Body :
o{"fk_bin_data_lib":"FKDATAHS101","user_id":"1001","verify_mode":"42","io_mode":"0","io_time":"20250627122233"}

Server Attendance Response Headers:
{
  "Date": "Fri, 27 Jun 2025 06:52:37 GMT",
  "Server": "Apache",
  "X-Powered-By": "PHP/8.1.32",
  "Cache-Control": "private",
  "Connection": "close, Upgrade",
  "Expires": "0",
  "response_code": "OK",
  "Upgrade": "h2,h2c",
  "Vary": "Accept-Encoding",
  "Content-Length": "0",
  "Content-Type": "application/octet-stream"
}

Server Attendance Response Body: NULL
